﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Common1.Master" AutoEventWireup="true" CodeBehind="frmAdminXx.aspx.cs" Inherits="WebApp3.frmAdminXx" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <asp:GridView ID="GridView1" runat="server" AllowPaging="True" AutoGenerateColumns="False" BackColor="#CCCCCC" BorderColor="#999999" BorderStyle="Solid" BorderWidth="3px" CellPadding="4" CellSpacing="2" DataKeyNames="id" DataSourceID="SqlDataSource1" ForeColor="Black" PageSize="6" Width="613px">
        <Columns>
            <asp:TemplateField HeaderText="留言主题">
                <ItemTemplate>
                    <table class="auto-style7">
                        <tr>
                            <td style="text-align: right">
                                <asp:Image ID="Image5" runat="server" Height="30px" ImageUrl='<%# Eval("face", "~\\face\\{0}.gif") %>' Width="30px" />
                            </td>
                            <td>
                                <asp:HyperLink ID="HyperLink1" runat="server" NavigateUrl='<%# Eval("id", "frmAdminGuanliLytable.aspx?id={0}") %>' Text='<%# Eval("lyzhuti", "{0}") %>'></asp:HyperLink>
                            </td>
                        </tr>
                    </table>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:BoundField DataField="name" HeaderText="留言者" SortExpression="name" />
            <asp:BoundField DataField="lytime" HeaderText="留言时间" SortExpression="lytime" />
            <asp:BoundField DataField="lyip" HeaderText="留言ip" SortExpression="lyip" />
            <asp:CommandField HeaderText="点击删除" ShowDeleteButton="True" />
        </Columns>
        <FooterStyle BackColor="#CCCCCC" />
        <HeaderStyle BackColor="Black" Font-Bold="True" ForeColor="White" />
        <PagerStyle BackColor="#CCCCCC" ForeColor="Black" HorizontalAlign="Left" />
        <RowStyle BackColor="White" />
        <SelectedRowStyle BackColor="#000099" Font-Bold="True" ForeColor="White" />
        <SortedAscendingCellStyle BackColor="#F1F1F1" />
        <SortedAscendingHeaderStyle BackColor="#808080" />
        <SortedDescendingCellStyle BackColor="#CAC9C9" />
        <SortedDescendingHeaderStyle BackColor="#383838" />
    </asp:GridView>
    <br />
    <asp:Label ID="Label1" runat="server" ForeColor="Red" Text="点击对应的留言主题可查看相应的内容和进行回复"></asp:Label>
    <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:dhd2014112111ConnectionString %>" DeleteCommand="DELETE FROM [LyTable] WHERE [id] = @id" InsertCommand="INSERT INTO [LyTable] ([lyzhuti], [lyneirong], [name], [lytime], [face], [lyip], [id], [ReyTime], [ReyNeirong], [ReyName]) VALUES (@lyzhuti, @lyneirong, @name, @lytime, @face, @lyip, @id, @ReyTime, @ReyNeirong, @ReyName)" SelectCommand="SELECT * FROM [LyTable]" UpdateCommand="UPDATE [LyTable] SET [lyzhuti] = @lyzhuti, [lyneirong] = @lyneirong, [name] = @name, [lytime] = @lytime, [face] = @face, [lyip] = @lyip, [ReyTime] = @ReyTime, [ReyNeirong] = @ReyNeirong, [ReyName] = @ReyName WHERE [id] = @id">
        <DeleteParameters>
            <asp:Parameter Name="id" Type="String" />
        </DeleteParameters>
        <InsertParameters>
            <asp:Parameter Name="lyzhuti" Type="String" />
            <asp:Parameter Name="lyneirong" Type="String" />
            <asp:Parameter Name="name" Type="String" />
            <asp:Parameter Name="lytime" Type="DateTime" />
            <asp:Parameter Name="face" Type="String" />
            <asp:Parameter Name="lyip" Type="String" />
            <asp:Parameter Name="id" Type="String" />
            <asp:Parameter Name="ReyTime" Type="DateTime" />
            <asp:Parameter Name="ReyNeirong" Type="String" />
            <asp:Parameter Name="ReyName" Type="String" />
        </InsertParameters>
        <UpdateParameters>
            <asp:Parameter Name="lyzhuti" Type="String" />
            <asp:Parameter Name="lyneirong" Type="String" />
            <asp:Parameter Name="name" Type="String" />
            <asp:Parameter Name="lytime" Type="DateTime" />
            <asp:Parameter Name="face" Type="String" />
            <asp:Parameter Name="lyip" Type="String" />
            <asp:Parameter Name="ReyTime" Type="DateTime" />
            <asp:Parameter Name="ReyNeirong" Type="String" />
            <asp:Parameter Name="ReyName" Type="String" />
            <asp:Parameter Name="id" Type="String" />
        </UpdateParameters>
    </asp:SqlDataSource>
</asp:Content>
